package com.org.platform.support.conponents.kafka;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

@Component
public class KafkaComponent {

	@Autowired
	private KafkaTemplate kafkaTemplate;

//	@KafkaListener(topics = "test")
	public void getMessage(String content) {
		System.out.println("get message:" + content);
	}


	public void sendMessage(String message) {
		kafkaTemplate.send("test", message);
	}

}
